home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / ddj9304.zip / WAVELET.ZIP / ANALYZER.L_C < prev    next >
Text File  |  1992-04-17  |  11KB  |  200 lines

  1.  
  2. Creation date: Fri Apr 17 11:30:03 1992    analyzer.s    page 1
  3.  
  4.  
  5. Address    Instruction    Line #    Source line
  6.             1    #include "dsp_type.h"
  7.             1    #define DSP32C 1
  8.             4    #endif
  9.             5    
  10.             6    .extern DECOMP, DRAWIMAG
  11.             7    .extern WAVEADRS, WAVELVLS, IMAGSHOW, LVLADDRS
  12.             8    .extern SIG_DRAW, DRAW_CNT, H_FILTER, L_FILTER
  13.             9    .extern RST_DATA, IM0_PTRS, IM1_PTRS, IMAGE_0
  14.             10    .extern STACKEND, SIGNALIN, DATA_OUT
  15.             11    
  16.             12            /*  ANALYZER
  17.             13                main control program for the wavelet analyzer
  18.             14                registers used: r1 r2 r3 r4 r5 r6 r8 r9
  19.             15                                r11 r12 r13 r14 r15 r16 r17
  20.             16                accumulators used: a0 a1 a2 a3
  21.             17            */
  22.             18    .rsect ".bank0"
  23. 0000    17400000    19              dauc = 0x0000;  /* initialize DAU formats */
  24. 0004    c0010000    20              r1e = WAVELVLS; /* point to jump address for wavelet filter size */
  25. 0008    c0020000    21              r2e = SIGNALIN; /* point to approximation data storage */
  26. 000c    1ea30037    22              r3 = *r1++;     /* load number of levels in wavelet transform */
  27. 0010    14800008    23              r4 = 8;         /* load number of unit intervals per image */
  28. 0014    94210002    24              r1e = r1 + 2;   /* point to the unit interval count storage */
  29. 0018    1fa40037    25              *r1++ = r4;     /* store the unit interval count value */
  30. 001c    18840080    26              r4 = r4 - r4;   /* zero the register */
  31. 0020    1fa40037    27              *r1++ = r4;     /* set active image flag storage to 0 (IMAGE 0) */
  32. 0024    34e0c187    28              a3 = a3 - a3;   /* intial data value is zero */
  33.             29    #if DSP32C
  34. 0028    188302e0    30              r3 = r3 - 1;    /* number of levels in wavelet transform - 1 */
  35. 002c    8c280003    31              do 8, r3;       /* repeat next nine instructions r5+1 times */
  36.             34    #endif
  37. 0030    1fe20037    35    INITAPPX: *r1++ = r2e;   /* store base address of each approximation level */
  38. 0034    30600197    36              *r2++ = a3 = a3; /* zero storage for approximation level */
  39. 0038    30600197    37              *r2++ = a3 = a3; /* r2 ends up pointing to first location .... */
  40. 003c    30600197    38              *r2++ = a3 = a3; /* in the next approximation level */
  41. 0040    30600197    39              *r2++ = a3 = a3;
  42. 0044    30600197    40              *r2++ = a3 = a3;
  43. 0048    30600197    41              *r2++ = a3 = a3;
  44.             42    #if DSP32C
  45. 004c    00000000    43              nop;
  46. 0050    1fe20037    44              *r1++ = r2e;    /* store the next location */
  47. 0054    17640987    45              ioc = 0x40987;  /* initialize the serial I/O to the codec */
  48. 0058    c0010000    46              r1e = RST_DATA; /* point to reset pointer initialization storage */
  49. 005c    c0020000    47              r2e = SIG_DRAW; /* point to signal drawing data sets */
  50. 0060    1460001a    48              r3 = 26;        /* integer pointer index, 4 bytes per pointer */
  51. 0064    94420016    49              r2e = r2 + 22;  /* point to bit pointer storage */
  52. 0068    8c030007    50              do 3, 7;        /* perform next 4 instructions eight times */
  53. 006c    1ee40037    51              r4e = *r1++;    /* load initial bit pointer */
  54. 0070    1ee50037    52              r5e = *r1++;    /* load initial byte column pointer */
  55. 0074    1fa40057    53              *r2++ = r4;     /* store initial bit pointer */
  56. 0078    1fe50043    54              *r2++r3 = r5e;  /* store initial byte column pointer */
  57.             69    #endif
  58. 007c    c00c0000    70              r12e = WAVEADRS; /* load pointer to filter jump address */
  59. 0080    c00d0000    71              r13e = STACKEND; /* load pointer to top of stack memory */
  60. 0084    1eeb0197    72              r11e = *r12++;   /* load jump address for filter size */
  61. 0088    1ef20197    73              r16e = *r12++;   /* load coefficient pointer wrap back index */
  62. 008c    1eb30197    74              r17 = *r12++;    /* load number of levels */
  63. 0090    1eb10190    75              r15 = *r12;      /* load image data space size / 4 */
  64. 0094    c0030000    76              r3e = IMAGE_0;   /* point to the detail level float output */
  65.             77    #if DSP32C
  66.  
  67.  
  68. Creation date: Fri Apr 17 11:30:04 199    analyzer.s    page 2
  69.  
  70.  
  71. Address    Instruction    Line #    Source line
  72. 0098    189102e0    78              r15 = r15 - 1;   /* number of data points minus one */
  73. 009c    8c200011    79              do 0, r15;       /* repeat next instruction r15+1 times */
  74. 00a0    3060019f    80              *r3++ = a3 = a3; /* clear four bytes in IMAGE_0 array */
  75.             85    #endif
  76. 00a4    a0000180    86              goto ENTRY_PT;   /* jump to the entry point */
  77. 00a8    00000000    87              nop;
  78.             88    
  79. 00ac    15000000    89    MAINLOOP: r8 = DATA_OUT;        /* point to output data array */
  80. 00b0    c00c0000    90              r12e = SIG_DRAW;      /* point to signal drawing data sets */
  81. 00b4    c0090000    91              r9e = DRAW_CNT;       /* point to draw count array */
  82. 00b8    30002387    92              a0 = *r8++;           /* load first signal data point */
  83. 00bc    98090220    93              r9e = r9 + r15;       /* index into draw count array */
  84. 00c0    e00e0000    94              call DRAWIMAG (r14);  /* draw the first input sample point */
  85. 00c4    1e690130    95              r9l = *r9;            /* load the draw loop counter */
  86. 00c8    c00c0000    96              r12e = SIG_DRAW;      /* point to signal drawing data sets */
  87. 00cc    042000f4    97    DRWLOOP1: if (ibf) goto SAMPL_IN; /* if true, next sample available */
  88. 00d0    00000000    98              nop;
  89. 00d4    30002387    99              a0 = *r8++;           /* load data point */
  90. 00d8    e00e0000    100              call DRAWIMAG (r14);  /* draw data point */
  91. 00dc    00000000    101              nop;
  92. 00e0    0d2000cc    102              if (r9-- >= 0) goto DRWLOOP1; /* repeat for all levels of xfrm */
  93.             103    #if DSP32C
  94. 00e4    00000000    104              nop;
  95.             107    #endif
  96. 00e8    040000e8    108    WAITIBF1: if (ibe) goto WAITIBF1; /* wait until next data sample arrives */
  97. 00ec    00000000    109              nop;
  98. 00f0    a000010c    110              goto TEST_LVL;
  99. 00f4    79600207    111    SAMPL_IN: a3 = float(ibuf);      /* load the new signal sample */
  100. 00f8    30002387    112    DRWLOOP2: a0 = *r8++;            /* load data point */
  101. 00fc    e00e0000    113              call DRAWIMAG (r14);   /* draw data point */
  102. 0100    00000000    114              nop;
  103. 0104    0d2000f8    115              if (r9-- >= 0) goto DRWLOOP2;
  104.             116    #if DSP32C
  105. 0108    00000000    117              nop;
  106.             120    #endif
  107. 010c    1af10000    121    TEST_LVL: r15 - 0;               /* test for process of all levels */
  108. 0110    00800180    122              if (ne) goto ENTRY_PT; /* if true, all levels have not been done */
  109. 0114    c00c0000    123              r12e = IMAGSHOW;       /* point to the unit interval count down */
  110. 0118    00000000    124              nop;
  111. 011c    1ea30197    125              r3 = *r12++;           /* load the unit interval count down */
  112. 0120    1ea40196    126              r4 = *r12--;           /* load the image draw flag */
  113. 0124    188302e0    127              r3 = r3 - 1;           /* decrement the unit interval count */
  114. 0128    00800180    128              if (ne) goto ENTRY_PT; /* if true, not done with new data set */
  115. 012c    1fa30197    129              *r12++ = r3;           /* save the new count */
  116. 0130    14600008    130              r3 = 8;                /* reset count to eight unit intervals */
  117. 0134    1a8c0002    131              r12 = r12 - 2;         /* point to unit interval count storage */
  118. 0138    1fa30197    132              *r12++ = r3;           /* save the reset count */
  119. 013c    1f840016    133              pir = r4;              /* interrupt host processor for new image */
  120. 0140    18040a04    134              r4 = r4;               /* tickle CAU flags for image set */
  121. 0144    00800158    135              if (ne) goto IM0_NEXT; /* if true, set up for drawing on IMAGE 0 */
  122. 0148    00000000    136              nop;
  123. 014c    14800001    137              r4 = 1;                /* next image displayed is IMAGE 1 */
  124. 0150    a0000160    138              goto PNTRINIT;         /* go to image pointer initialization */
  125. 0154    c0020000    139              r2e = IM1_PTRS;        /* set up for drawing on IMAGE 1 */
  126.             140    
  127. 0158    14800000    141    IM0_NEXT: r4 = 0;          /* next image displayed is IMAGE 0 */
  128. 015c    c0020000    142              r2e = IM0_PTRS;  /* set up for drawing on IMAGE 0 */
  129. 0160    14200000    143    PNTRINIT: r1 = SIG_DRAW;   /* point to signal drawing data sets */
  130. 0164    1fa40197    144              *r12++ = r4;     /* save the image draw flag */
  131. 0168    94210018    145              r1e = r1 + 24;   /* point to byte column pointer storage */
  132.  
  133.  
  134. Creation date: Fri Apr 17 11:30:06 199    analyzer.s    page 3
  135.  
  136.  
  137. Address    Instruction    Line #    Source line
  138.             146    #if DSP32C
  139. 016c    c011001c    147              r15e = 28;       /* set up post increment value */
  140. 0170    8c000007    148              do 0, 7;         /* perform next instruction eight times */
  141. 0174    38000b89    149              a0 = (*r1++r15 = *r2++) + a0; /* moves four bytes at once! */
  142.             156    #endif
  143. 0178    04e00178    157    WAIT_PIE: if (pif) goto WAIT_PIE; /* wait for pif flag to be cleared */
  144. 017c    00000000    158              nop;
  145. 0180    c0030000    159    ENTRY_PT: r3e = SIGNALIN;           /* point to input signal storage array */
  146. 0184    04000184    160    WAITIBF2: if (ibe) goto WAITIBF2;   /* wait until next data sample arrives */
  147. 0188    18110a13    161              r15 = r17;                /* inititialize the recursion counter */
  148. 018c    7940021f    162              *r3++ = a2 = float(ibuf); /* output second data sample first */
  149. 0190    c0060000    163              r6e = DATA_OUT;    /* point to output data array */
  150. 0194    30600198    164              *r3 = a3 = a3;     /* output first data sample last */
  151. 0198    306001b7    165              *r6++ = a3 = a3;   /* place first sample in data output array */
  152. 019c    30400137    166              *r6++ = a2 = a2;   /* place second sample in data output array */
  153. 01a0    c0010000    167              r1e = H_FILTER;    /* point to detail filter coefficients */
  154. 01a4    c0020000    168              r2e = L_FILTER;    /* point to approx. filter coefficients */
  155. 01a8    c00c0000    169              r12e = LVLADDRS;   /* point to data level address pointers */
  156. 01ac    34800007    170              a0 = a0 - a0;      /* zero the accumulators */
  157. 01b0    e00e0000    171              call DECOMP (r14); /* start the recursive decomposition */
  158. 01b4    30200007    172              a1 = a0;
  159. 01b8    a00000ac    173              goto MAINLOOP;
  160. 01bc    00000000    174              nop;
  161.  
  162.  
  163. d3as:warning:analyzer.s line 95: branch dest can't start with inst referencing 
  164.         reg being loaded
  165.  
  166.  
  167.  
  168. Symbol Table
  169. .file    analyzer.s
  170. .bank0    (section 1)    size 0x1c0
  171. TEST_LVL    section 1    defined    value 0x10c
  172. DATA_OUT    section 255    external    value 0x0
  173. SIGNALIN    section 255    external    value 0x0
  174. STACKEND    section 255    external    value 0x0
  175. IMAGSHOW    section 255    external    value 0x0
  176. IM0_PTRS    section 255    external    value 0x0
  177. H_FILTER    section 255    external    value 0x0
  178. IM0_NEXT    section 1    defined    value 0x158
  179. DECOMP    section 255    external    value 0x0
  180. SAMPL_IN    section 1    defined    value 0xf4
  181. WAITIBF1    section 1    defined    value 0xe8
  182. WAVEADRS    section 255    external    value 0x0
  183. WAITIBF2    section 1    defined    value 0x184
  184. RST_DATA    section 255    external    value 0x0
  185. ENTRY_PT    section 1    defined    value 0x180
  186. WAVELVLS    section 255    external    value 0x0
  187. DRAWIMAG    section 255    external    value 0x0
  188. INITAPPX    section 1    defined    value 0x30
  189. LVLADDRS    section 255    external    value 0x0
  190. WAIT_PIE    section 1    defined    value 0x178
  191. DRWLOOP1    section 1    defined    value 0xcc
  192. DRWLOOP2    section 1    defined    value 0xf8
  193. PNTRINIT    section 1    defined    value 0x160
  194. IMAGE_0    section 255    external    value 0x0
  195. MAINLOOP    section 1    defined    value 0xac
  196. IM1_PTRS    section 255    external    value 0x0
  197. DRAW_CNT    section 255    external    value 0x0
  198. SIG_DRAW    section 255    external    value 0x0
  199. L_FILTER    section 255    external    value 0x0
  200.